<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改批量入库')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: bootstrap-fileinput-css"/>
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-rukuTest-edit" th:object="${piliangRuku}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label">购货单号：</label>
                <div class="col-sm-8">
                    <input name="gouhuoDanhao" th:field="*{gouhuoDanhao}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">购货日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="chukuDate" th:value="${#dates.format(piliangRuku.chukuDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">商品名称：</label>
                <div class="col-sm-8">
                    <input name="shangpinName" th:field="*{shangpinName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">商品图片：</label>
                <div class="col-sm-8">
                    <img th:src="*{tupian}">
                    <input type="hidden" name="tupian">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">商品类别：</label>
                <div class="col-sm-8">
                    <input name="shangpinLeibie" th:field="*{shangpinLeibie}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">规格宽：</label>
                <div class="col-sm-8">
                    <input name="guiGeKuan" th:field="*{guiGeKuan}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">规格高：</label>
                <div class="col-sm-8">
                    <input name="guiGeGao" th:field="*{guiGeGao}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">开向：</label>
                <div class="col-sm-8">
                    <input name="kaiXiang" th:field="*{kaiXiang}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">商品数量：</label>
                <div class="col-sm-8">
                    <input name="shuLiang" th:field="*{shuLiang}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">商品单价：</label>
                <div class="col-sm-8">
                    <input name="danJia" th:field="*{danJia}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">总金额：</label>
                <div class="col-sm-8">
                    <input name="zongjine" th:field="*{zongjine}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="beizhu" th:field="*{beizhu}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">入库操作人：</label>
                <div class="col-sm-8">
                    <input name="rukuMen" th:field="*{rukuMen}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <th:block th:include="include :: bootstrap-fileinput-js"/>
    <script th:inline="javascript">
        var prefix = ctx + "piliangruku/rukuTest";
        $("#form-rukuTest-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-rukuTest-edit').serialize());
            }
        }

        $("input[name='gouhuoDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
        $(".file-upload").fileinput({
            uploadUrl: ctx + 'common/upload',
            maxFileCount: 1,
            autoReplace: true
        }).on('fileuploaded', function (event, data, previewId, index) {
            $("input[name='" + event.currentTarget.id + "']").val(data.response.url)
        }).on('fileremoved', function (event, id, index) {
            $("input[name='" + event.currentTarget.id + "']").val('')
        })
    </script>
</body>
</html>